package com.zrl.ggkt.vod.controller;

import com.zrl.ggkt.result.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: zrl
 * @date: 2022/8/11 14:39
 * @description:
 */
@Api(tags = "用户登录信息管理接口 ")
@RestController
@RequestMapping("/admin/vod/user")
//@CrossOrigin
public class UserLoginController {


    //返回数据{"code":20000,"data":{"token":"admin-token"}}
    @PostMapping("login")
    public R login(){
        Map<String,Object> map = new HashMap<>();
        map.put("token","admin-token");
        return R.ok(map);
    }

    //返回数据
    //{"code":20000,"data":{
    // "roles":["admin"],
    // "introduction":"I am a super administrator",
    // "avatar":"https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif",
    // "name":"Super Admin"}}
    @GetMapping("info")
    public R info(){
        Map<String,Object> map = new HashMap<>();
        map.put("roles","admin");
        map.put("introduction","I am a super administrator");
        map.put("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
        map.put("name","Super Admin");
        return R.ok(map);
    }

}
